package com.mingke.java.GroupChat;

import java.nio.channels.SocketChannel;

/**
 * @author mingke
 * @function 用户的相关信息实体类
 * @date 2021/11/9
 */
public class GroupChatUserInfo {
    private Integer uid;
    private String username;
    private SocketChannel socketChannel;

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public SocketChannel getSocketChannel() {
        return socketChannel;
    }

    public void setSocketChannel(SocketChannel socketChannel) {
        this.socketChannel = socketChannel;
    }
    //自定义的构造器
    public GroupChatUserInfo(String username, SocketChannel socketChannel) {
        this.uid = socketChannel.hashCode();
        this.username = username;
        this.socketChannel = socketChannel;
    }
}
